<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const code1 = `
        function Add(a, b) {
            return a + b
        }
        export { Add }
        `
        const url = URL.createObjectURL(new Blob([code1], { type: 'application/javascript' }))
        const code2 = `import {Add} from '${url}';
        console.log(Add(1, 2))
        `
        const script = document.createElement('script')
        script.type = 'module'
        script.textContent = code2
        document.body.appendChild(script)
    </script>
</body>

</html>